package com.superhelper.app.controller;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.superhelper.app.controller.base.AbstractController;
import com.superhelper.app.domain.Resp;
import com.superhelper.app.service.UserService;
import com.superhelper.common.domain.User;

/**
 * 
 * */
@Controller
@RequestMapping("v1/customer")
public class CustomerController extends AbstractController {

	@Autowired
	private UserService userService;

	/**
	 * 顾客列表
	 * 
	 * @return
	 * @throws ServiceException
	 */
	@RequestMapping("list")
	@ResponseBody
	public Resp list(@RequestParam Long userId, @RequestParam Integer page,
			@RequestParam Integer pageSize) {

		List<User> list= userService.getList(userId, page, pageSize);
		return success(list);
	}
}
